//跳转搜索页面
$(".search_hot").on("click", function () {
    location.href = "../novel/search"
})
//返回上一页面
$(".return_back").on("click", function () {
    window.history.back();
})
//分类遮罩显示隐藏
$(".classifty_btn").on("click", function () {
    if ($(this).attr("check") == "false") {
        $(this).attr("check", "true");
        $(".classifty").css("display", "block");
        $("body").css("overflow", "hidden");
        $(".classifty_nav>li").eq(0).on("click", function (e) {
            var e = e || event;
            e.stopPropagation();
            location.href = "../novel/newBook";
        })
        $(".classifty_nav>li").eq(1).on("click", function (e) {
            var e = e || event;
            e.stopPropagation();
            location.href = "../novel/rankBook";
        })
        $(".classifty_nav>li").eq(2).on("click", function (e) {
            var e = e || event;
            e.stopPropagation();
            location.href = "../html/classifty.html";
        })
        $(".classifty_nav>li").eq(3).on("click", function (e) {
            var e = e || event;
            e.stopPropagation();
            location.href = "../novel/freeBook";
        })
    } else {
        $(".classifty").css("display", "none");
        $(this).attr("check", "false");
        $("body").css("overflow", "auto")
    }
})
$(".classifty").on("click", function () {
    $(".classifty_btn").trigger("click")
})

//进入相应的排行
$("content>ul>li>img").on("click", function () {
    var index = $(this).parent().index();
    if(index == 0){
        location.href = "../novel/HotSaleRank";
    }else if(index == 1){
        location.href = "../novel/NewBookRank";
    }else if(index == 2){
        location.href = "../novel/ClickRank";
    }else if(index == 3){
        location.href = "../novel/BookTypeRank?isFinish=2";
    }else if(index == 4){
        location.href = "../novel/BookTypeRank?isFinish=1";
    }
})
$("content>ul>li>span").on("click", function () {
    $(this).parents("li").children("img").trigger("click")
})
//进入相应的书籍详情
$("content>ul>li>div>p").on("click", function () {
    console.log($(this).index())
})